package com.itheima.dao;

import com.itheima.pojo.Menu;

import java.util.List;

public interface MenuDao {

    // 查询 level 级menu,并级联查询子级
    List<Menu> selectMenuLevelNWithChildren(int level);

    //查询 level 级menu,不级联子级
    List<Menu> selectMenuLevelNWithoutChildren(int level);

    List<Menu> selectMenuLevel1BaseUserNameWithoutChildren(String  username);

    List<Menu> selectMenuLevel1BaseUserNameWithChildren(String  username);


    void insertIntoRoleMenu(int menuId);


    Menu selectMenuByIdWithChildren(int id);

    Menu selectMenuByIdWithoutChildren(int id);

    List<Menu> queryByKeyWord(String keyword);

    void deleteMenuById(Integer id);

    void deleteMenuByParentMenuId(int id);

    void deleteRoleMenuByMenuId(int id);

    int selectLevel1MenuId();

    void insertMenu(Menu menu);

    void updateMenu(Menu menu);


}
